Added support for CompeGPS data files
authoroliskoli <oliskoli@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 26 Oct 2005 23:13:36 +0000 (23:13 +0000)
committeroliskoli <oliskoli@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 26 Oct 2005 23:13:36 +0000 (23:13 +0000)
13 files changed:
gpsbabel/Makefile
gpsbabel/README
gpsbabel/compegps.c [new file with mode: 0644]
gpsbabel/csv_util.c
gpsbabel/csv_util.h
gpsbabel/reference/compegps-wpt.gpx [new file with mode: 0644]
gpsbabel/reference/compegps.wpt [new file with mode: 0644]
gpsbabel/reference/route/compegps-rte.gpx [new file with mode: 0644]
gpsbabel/reference/route/compegps.rte [new file with mode: 0644]
gpsbabel/reference/track/compegps-trk.gpx [new file with mode: 0644]
gpsbabel/reference/track/compegps.trk [new file with mode: 0644]
gpsbabel/testo
gpsbabel/vecs.c

index ab767d236c785f73d8be300b91d4193ed49bd4df..2c89b102f316f25f3edb05cf5cd63fc5c900d37c 100644 (file)
@@ -39,7 +39,7 @@ FMTS=magproto.o gpx.o geo.o mapsend.o mapsource.o garmin_tables.o \
        igc.o brauniger_iq.o shape.o hiketech.o glogbook.o coastexp.o \
        vcf.o overlay.o kml.o google.o lowranceusr.o an1.o tomtom.o \
        tef_xml.o maggeo.o pathaway.o vitosmt.o gdb.o bcr.o coto.o \
-       ignrando.o stmwpp.o msroute.o cst.o nmn4.o mag_pdb.o
+       ignrando.o stmwpp.o msroute.o cst.o nmn4.o mag_pdb.o compegps.o
 
 FILTERS=position.o duplicate.o arcdist.o polygon.o smplrout.o reverse_route.o sort.o stackfilter.o trackfilter.o discard.o
 
@@ -155,6 +155,7 @@ brauniger_iq.o: brauniger_iq.c defs.h queue.h gbtypes.h jeeps/gpsserial.h \
   jeeps/gpsproj.h jeeps/gpsnmeafmt.h jeeps/gpsnmeaget.h
 cetus.o: cetus.c defs.h queue.h gbtypes.h coldsync/palm.h coldsync/pdb.h
 coastexp.o: coastexp.c defs.h queue.h gbtypes.h xmlgeneric.h uuid.h cet_util.h
+compegps.o: compegps.c defs.h queue.h gbtypes.h csv_util.h
 copilot.o: copilot.c defs.h queue.h gbtypes.h coldsync/palm.h \
   coldsync/pdb.h
 coto.o: coto.c defs.h queue.h gbtypes.h csv_util.h coldsync/palm.h \
index 02d8d35220211a1cb4577a8dfc52e4de51a02a0f..a383ede79a5a0e36cbdf24299ddbd63d81b7f21a 100644 (file)
@@ -1178,6 +1178,25 @@ THE FORMATS
        and (maybe) other software. The exported files can contain maps 
        and/or route descriptions. The reader for this format has been
        tested with PowerRoute 5+6, Motorrad-Routenplaner 2002(-2006).
+       
+    CompeGPS
+    
+       Support for CompeGPS data files.
+       These data files are "character" separated text files like the pcx
+       format. "Character" means special data lines can have their own
+       separator. 
+       
+       Since release 6.1 GPX is a also a supported import/export format for
+       waypoints, routes and tracks.
+       
+       For more information please have a look at
+       
+           http://www.compegps.com
+       
+       Options:
+       
+           index: Index of route/track 
+           snlen: Length of generated short names (default 16)
 
 
 DATA FILTERS
diff --git a/gpsbabel/compegps.c b/gpsbabel/compegps.c
new file mode 100644 (file)
index 0000000..7f51751
--- /dev/null
@@ -0,0 +1,639 @@
+/*
+
+    Support for CompeGPS waypoint (.wpt), route (.rte)  and track (.trk) files,
+
+    Copyright (C) 2005 Olaf Klein, o.b.klein@t-online.de
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
+*/
+
+/*
+    History:
+               10/23/2005: First release; only a reader
+               10/25/2005: becomes a writer too
+               10/26/2005: received documention from CompeGPS team
+                           added fatals for "G" and "U" if not WGS84 and lat/lon
+*/
+
+/*  
+    
+    the meaning of leading characters in CompeGPS data lines (enhanced PCX):
+
+    header lines:    
+    
+       "G": WGS 84                     - Datum of the map
+       "N": Anybody                    - Name of the user
+       "L": -02:00:00                  - Difference to UTC
+       "M": ...                        - Any comments
+       "R": 16711680 , xxxx , 1        - Route header
+       "U": 1                          - System of coordinates (0=UTM 1=Latitude/Longitude)
+
+       "C":  0 0 255 2 -1.000000       - ???
+       "V":  0.0 0.0 0 0 0 0 0.0       - ???
+       "E": 0|1|00-NUL-00 00:00:00|00:00:00|0 - ???
+       
+    data lines:
+    
+       "W": if(route) routepoint; else waypoint
+       "T": trackpoint    
+       "t": if(track) additionally track info
+            if(!track) additionally trackpoint info
+       "a": link to ...
+       "w": waypoint additional info
+    
+*/
+
+#include "defs.h"
+#include "csv_util.h"
+
+#include <ctype.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
+#define MYNAME "CompeGPS"
+
+#define SHORT_NAME_LENGTH 16
+
+static FILE *fin, *fout;
+static char *fin_name, *fout_name;
+static int target_index, curr_index;
+static int track_info_flag;
+static short_handle sh;
+static int snlen;
+static int radius;
+
+static route_head *curr_track;
+static route_head *curr_route;
+
+/* placeholders for options */
+
+static char *option_icon;
+static char *option_index;
+static char *option_radius;
+static char *option_snlen;
+
+static
+arglist_t compegps_args[] = {
+       {"deficon", &option_icon, "Default icon name", 
+               NULL, ARGTYPE_STRING},
+       {"index", &option_index, "Index of route/track to write (if more the one in source)", 
+               NULL, ARGTYPE_INT},
+       {"radius", &option_radius, "Give points (waypoints/route points) a default radius", 
+               NULL, ARGTYPE_FLOAT},
+       {"snlen", &option_snlen, "Length of generated shortnames (default 16)", 
+               NULL, ARGTYPE_INT},
+       {0, 0, 0, 0, 0}
+};
+
+/* specialized readers */
+
+static waypoint*
+parse_wpt(char *buff)
+{
+       int col = -1;
+       char *c, *cend, *cx;
+       waypoint *wpt = waypt_new();
+
+       c = strstr(buff, "A ");
+       if (c == buff) col++;
+
+       c = csv_lineparse(buff, " ", "", col++);
+       while (c != NULL)
+       {
+               c = lrtrim(c);
+               if (*c != '\0')
+               {
+#if 0
+                       printf(MYNAME "_read_wpt: col(%d)=%s\n", col, c);
+#endif
+                       switch(col)
+                       {
+                               case 0:
+                                       
+                                       cx = c + strlen(c) - 1;         /* trim trailing underscores */
+                                       while ((cx >= c) && (*cx == '_')) *cx-- = '\0';
+                                       if (*c != '\0')
+                                               wpt->shortname = xstrdup(c);
+                                       break;
+                               case 2:
+                                       human_to_dec(c, &wpt->latitude, NULL, 1);
+                                       break;
+                               case 3:
+                                       human_to_dec(c, NULL, &wpt->longitude, 2);
+                                       break;
+                               case 4: break;                          /* Unused date and time */
+                               case 5: break;                          /* always "27-MAR-62 00:00:00" */
+                               case 6:
+                                       wpt->altitude = atof(c);
+                                       break;
+                               case 7:
+                                       wpt->description = xstrdup(c);
+                                       break;
+                               default:
+                                       if (col > 7)
+                                       {
+                                               wpt->description = xstrappend(wpt->description, " ");
+                                               wpt->description = xstrappend(wpt->description, c);
+                                       }
+                       }
+               }
+               c = csv_lineparse(NULL, " ", "", col++);
+       }
+       return wpt;
+}
+
+static void
+parse_wpt_info(const char *buff, waypoint *wpt)                /* "w" */
+{
+       char *c;
+       int col = -1;
+       double fx;
+       
+       c = csv_lineparse(buff, ",", "", col++);
+       while (c != NULL)
+       {
+               c = lrtrim(c);
+               if (*c != '\0')
+               {
+#if 0
+                       printf(MYNAME "_read_wpt_info: col(%d)=%s\n", col, c);
+#endif
+                       switch(col)
+                       {
+                               case 0: 
+                                       wpt->icon_descr = xstrdup(c);
+                                       wpt->wpt_flags.icon_descr_is_dynamic = 1;
+                                       break;
+                               case 1: break;                  /* Text postion */
+                               case 2: break;                  /* Lens zoom level */
+                               case 3: break;                  /* Text colour */
+                               case 4: break;                  /* Background colour */
+                               case 5: break;                  /* Transparent text  (0=transparent, 1=no transparent) */
+                               case 6: break;                  /* ??? */
+                               case 7: break;                  /* ??? */
+                               case 8:                         /* radius */
+                                       fx = atof(c);
+                                       if (fx > 0)
+                                               wpt->proximity = fx;
+                                       break;
+                       }
+               }
+               c = csv_lineparse(NULL, ",", "", col++);
+       }
+}
+
+static waypoint *
+parse_trkpt(char *buff)
+{
+       int col = -1;
+       char *c;
+       struct tm tm;
+       char month[4];
+       waypoint *wpt = waypt_new();
+
+       c = strstr(buff, "A ");
+       if (c == buff) col++;
+
+       memset(&tm, 0, sizeof(tm));
+       c = csv_lineparse(buff, " ", "", col++);
+       while (c != NULL)
+       {
+               c = lrtrim(c);
+               if (*c != '\0')
+               {
+#if 0
+                       printf(MYNAME "_read_trkpt: col(%d)=%s\n", col, c);
+#endif
+                       switch(col)
+                       {
+                               case 2:
+                                       human_to_dec(c, &wpt->latitude, NULL, 1);
+                                       break;
+                               case 3:
+                                       human_to_dec(c, NULL, &wpt->longitude, 2);
+                                       break;
+                               case 4:
+                                       tm.tm_mday = atoi(c);
+                                       strncpy(month, c+3, 3);
+                                       month[3] = 0;
+                                       tm.tm_mon = month_lookup(month);
+                                       tm.tm_year = atoi(c + 7);
+                                       if (tm.tm_year < 70) tm.tm_year += 100;
+                                       break;
+                               case 5:
+                                       tm.tm_hour = atoi(c);
+                                       tm.tm_min = atoi(c+3);
+                                       tm.tm_sec = atoi(c+6);
+                                       wpt->creation_time = mkgmtime(&tm);
+                                       break;
+                               case 7:
+                                       wpt->altitude = atof(c);
+                                       break;
+                       }
+               }
+               c = csv_lineparse(NULL, " ", "", col++);
+       }
+       return wpt;
+}
+
+static void
+parse_track_info(const char *buff, route_head *track)  /* "t" */
+{
+       char *c;
+       int col = -1;
+       
+       c = csv_lineparse(buff, "|", "", col++);
+       while (c != NULL)
+       {
+               c = lrtrim(c);
+               if (*c != '\0')
+               {
+#if 0
+                       printf(MYNAME "_read_track_info: col(%d)=%s\n", col, c);
+#endif
+                       switch(col)
+                       {
+                               case 0: 
+                                       break;  /* unknown field */
+                               case 1:
+                                       track->rte_name = xstrdup(c);
+                                       break;
+                               case 2: 
+                                       break;  /* unknown field */
+                               case 3: 
+                                       break;  /* unknown field */
+                       }
+               }
+               c = csv_lineparse(NULL, "|", "", col++);
+       }
+}
+
+static void
+parse_rte_info(const char *buff, route_head *route)    /* "R" */
+{
+       char *c;
+       int col = -1;
+       
+       c = csv_lineparse(buff, ",", "", col++);
+       while (c != NULL)
+       {
+               c = lrtrim(c);
+               if (*c != '\0')
+               {
+#if 0
+                       printf(MYNAME "_read_rte_info: col(%d)=%s\n", col, c);
+#endif
+                       switch(col)
+                       {
+                               case 0: break;                          /* unknown field (colour?) */
+                               case 1: 
+                                       route->rte_name = xstrdup(c);
+                                       break;
+                               case 2: break;                          /* unknown field */
+                                       
+                       }
+               }
+               c = csv_lineparse(NULL, ",", "", col++);
+       }
+}
+
+/* main functions */
+
+static void
+compegps_rd_init(const char *fname)
+{
+       fin_name = (char *)fname;
+       fin = xfopen(fname, "r", MYNAME);
+}
+
+static void
+compegps_rd_deinit(void)
+{
+       fclose(fin);
+}
+
+static void
+compegps_data_read(void)
+{
+       char buff[1024];
+       int line = 0;
+       waypoint *wpt;
+       route_head *route = NULL;
+       route_head *track = NULL;
+       
+       while (NULL != fgets(buff, sizeof(buff), fin))
+       {
+               char *cin = buff;
+               char *ctail, *cx;
+               
+               line++;
+               cin = lrtrim(buff);
+               if (strlen(cin) == 0) continue;
+               
+               ctail = strchr(cin, ' ');
+               if (ctail == NULL) continue;
+               ctail = lrtrim(ctail);
+               
+               switch(*cin)
+               {
+                       case 'G':
+                               cx = csv_stringclean(ctail, " ");
+                               is_fatal((strcmp(cx, "WGS84") != 0), MYNAME ": Unsupported datum \"%s\"!", ctail);
+                               xfree(cx);
+                               break;
+                       case 'U':
+                               switch(*ctail)
+                               {
+                                       case '1': /* lat/lon, that's we want to see */ 
+                                               break;
+                                       case '0': /* UTM not supported yet */
+                                               fatal(MYNAME "Sorry, UTM is not supported yet!\n");
+                                       default:
+                                               fatal(MYNAME "Invalid system of coordinates (%s)!\n", cin);
+                               }
+                               break;
+                       case 'R':
+                               route = route_head_alloc();
+                               route_add_head(route);
+                               parse_rte_info(ctail, route);
+                               break;
+                       case 'M':
+                               break;
+                       case 'W':
+                               wpt = parse_wpt(ctail);
+                               if (wpt != NULL)
+                               {
+                                       if (route != NULL)
+                                               route_add_wpt(route, wpt);
+                                       else
+                                               waypt_add(wpt);
+                               }
+                               break;
+                       case 'w':
+                               is_fatal((wpt == NULL), MYNAME ": No waypoint data before \"%s\"!", cin);
+                               parse_wpt_info(ctail, wpt);
+                               break;
+                       case 'T': 
+                               wpt = parse_trkpt(ctail);
+                               if (wpt != NULL)
+                               {
+                                       if (track == NULL)
+                                       {
+                                               track = route_head_alloc();
+                                               track_add_head(track);
+                                       }
+                                       route_add_wpt(track, wpt);
+                               }
+                               break;
+                       case 't':
+                               if (track != NULL)
+                                       parse_track_info(ctail, track);
+                               break;
+               }
+       }         
+}
+
+/* ----------------------------------------------------------- */
+
+static void
+write_waypt_cb(const waypoint *wpt)
+{
+       char *name;
+       
+       if (curr_index != target_index ) return;
+       
+       name = (snlen > 0) ? mkshort_from_wpt(sh, wpt) : csv_stringclean(wpt->shortname, " ");
+       
+       fprintf(fout, "W  %s A ", name);
+       fprintf(fout, "%.10f%c%c ",
+               wpt->latitude, 0xBA, (wpt->latitude >= 0) ? 'N' : 'S');
+       fprintf(fout, "%.10f%c%c ",
+               wpt->longitude, 0xBA, (wpt->longitude >= 0) ? 'E' : 'W');
+       fprintf(fout, "27-MAR-62 00:00:00 %.6f", 
+               (wpt->altitude != unknown_alt) ? wpt->altitude : 0.0);
+       if (wpt->description != NULL)
+               fprintf(fout, " %s", wpt->description);
+       fprintf(fout, "\n");
+       
+       if ((wpt->icon_descr != NULL) || (wpt->proximity > 0.0) || \
+           (option_icon != NULL))
+       {
+               char *icon = option_icon;
+               
+               if (wpt->icon_descr != NULL) icon = wpt->icon_descr;
+                       
+               fprintf(fout, "w  %s,0,0.0,16777215,255,1,7,,%.1f\n",
+                       (icon != NULL) ? icon : "Waypoint",
+                       (wpt->proximity > 0.0f) ? wpt->proximity : 0.0);
+       }
+       xfree(name);
+}
+
+static void 
+write_route_hdr_cb(const route_head *rte)
+{
+       char *name;
+       curr_route = (route_head *) rte;
+       curr_index++;
+       if (curr_index != target_index) return;
+       
+       name = rte->rte_name;
+       if (name != NULL)
+               name = csv_stringclean(name, ",");
+       else
+               name = xstrdup(" ");
+       fprintf(fout, "R  16711680,%s,1,-1\n", name);
+       xfree(name);
+}
+
+static void 
+write_route(void)
+{
+       curr_index = 0;
+       route_disp_all(write_route_hdr_cb, NULL, write_waypt_cb);
+}
+
+static void
+write_track_hdr_cb(const route_head *trk)
+{
+       track_info_flag = 0;
+       curr_track = (route_head *) trk;
+       
+       curr_index++;
+       if (curr_index != target_index) return;
+       
+       track_info_flag = 1;
+}
+
+static void
+write_trkpt_cb(const waypoint *wpt)
+{
+       char buff[128];
+       struct tm tm;
+       
+       if ((curr_index != target_index) || (wpt == NULL)) return;
+       
+       buff[0] = '\0';
+       
+       if (wpt->creation_time != 0)
+       {
+               char *cx = &buff;
+               tm = *gmtime(&wpt->creation_time);
+               strftime(buff, sizeof(buff), "%d-%b-%y %H:%M:%S", &tm);
+               while (*cx != '\0')
+               {
+                       *cx = toupper(*cx);
+                       cx++;
+               }
+       }
+       
+       fprintf(fout, "T  A %.10f%c%c %.10f%c%c ",
+               wpt->latitude, 0xBA, (wpt->latitude >= 0) ? 'N' : 'S',
+               wpt->longitude, 0xBA, (wpt->longitude >= 0) ? 'E' : 'W');
+       fprintf(fout, "%s s %.1f %.1f %.1f %.1f %d ",
+               buff,
+               wpt->altitude,
+               0.0,
+               0.0,
+               0.0,
+               0);
+       fprintf(fout, "%.1f %.1f %.1f %.1f %.1f\n",
+               -1000.0,
+               -1.0,
+               -1.0,
+               -1.0,
+               -1.0);
+       if (track_info_flag != 0)
+       {
+               track_info_flag = 0;
+               if (curr_track->rte_name != NULL)
+               {
+                       char *name;
+                       
+                       name = csv_stringclean(curr_track->rte_name, "|");
+                       fprintf(fout, "t 4294967295|%s|-1|-1\n", name);
+                       xfree(name);
+               }
+       }
+}
+
+static void
+write_track(void)
+{
+       curr_index = 0;
+       
+//     fprintf(fout, "L  +02:00:00\n");
+       track_disp_all(write_track_hdr_cb, NULL, write_trkpt_cb);
+       fprintf(fout, "F  1234\n");
+}
+
+static void
+write_waypoints(void)
+{
+       waypt_disp_all(write_waypt_cb);
+}
+
+/* --------------------------------------------------------------------------- */
+
+static void
+compegps_wr_init(const char *fname)
+{
+       fout_name = (char *)fname;
+       fout = xfopen(fname, "w", MYNAME);
+       sh = mkshort_new_handle();
+}
+
+static void
+compegps_wr_deinit(void)
+{
+       mkshort_del_handle(&sh);
+       fclose(fout);
+}
+
+static void
+compegps_data_write(void)
+{
+       /* because of different file extensions we can only write one GPS data type at time */
+       
+       fprintf(fout, "G  WGS 84\n");
+       fprintf(fout, "U  1\n");
+       
+       /* process options */
+       
+       target_index = 1;
+       if (option_index != NULL)
+               target_index = atoi(option_index);
+               
+       snlen = 0;
+       if (global_opts.synthesize_shortnames != 0)
+       {
+               if (option_snlen != NULL)
+                       snlen = atoi(option_snlen);
+               else
+                       snlen = SHORT_NAME_LENGTH;
+               
+               is_fatal((snlen < 1), MYNAME "Invalid length for generated shortnames!");
+               
+               setshort_whitespace_ok(sh, 0);
+               setshort_length(sh, snlen);
+       }
+       
+       radius = -1;
+       if (option_radius != 0)
+       {
+           radius = atof(option_radius);
+           is_fatal((radius <= 0.0), MYNAME "Invalid value for radius!");
+       }
+       
+       if (option_icon != NULL)
+       {
+               if (*option_icon == '\0')
+                       option_icon = NULL;
+               else if (case_ignore_strcmp(option_icon, "deficon") == 0)
+                       option_icon = NULL;
+       }
+       
+       switch(global_opts.objective)
+       {
+               case wptdata:
+                       curr_index = target_index = 0;
+                       write_waypoints();
+                       break;
+               case trkdata:
+                       write_track();
+                       break;
+               case rtedata:
+                       write_route();
+                       break;
+       }
+}
+
+/* --------------------------------------------------------------------------- */
+
+ff_vecs_t compegps_vecs = {
+       ff_type_file,
+       FF_CAP_RW_ALL,
+       compegps_rd_init,
+       compegps_wr_init, 
+       compegps_rd_deinit,
+       compegps_wr_deinit,
+       compegps_data_read,
+       compegps_data_write,
+       NULL,
+       compegps_args,
+       CET_CHARSET_MS_ANSI, 1
+};
index 6292596e794e3bf32cb211c1ba1a5d27ac30410f..6bfbfc786d425edfcb1c43501e737f962552b715 100644 (file)
@@ -349,7 +349,7 @@ decdir_to_dec(const char * decdir)
  *        which: 0-no preference    1-prefer lat    2-prefer lon
  *****************************************************************************/
 
-static void
+void
 human_to_dec( const char *instr, double *outlat, double *outlon, int which )
 {
     double unk[3] = {999,999,999};
index c8257726fde0f41989146bb54578fadc76270eb7..a69803e740a9713f0f9ae170d4f28d136d97d49d 100644 (file)
@@ -30,6 +30,9 @@ CSV_STRINGTRIM(const char *string, const char *enclosure, int strip_max, DEBUG_P
 char *
 csv_lineparse(const char *stringstart, const char *delimited_by, const char *enclosed_in, const int line_no);
 
+void
+human_to_dec( const char *instr, double *outlat, double *outlon, int which );
+
 char *
 #ifndef DEBUG_MEM
 csv_stringclean(const char *string, const char *chararray);
diff --git a/gpsbabel/reference/compegps-wpt.gpx b/gpsbabel/reference/compegps-wpt.gpx
new file mode 100644 (file)
index 0000000..42f7751
--- /dev/null
@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gpx
+ version="1.0"
+creator="GPSBabel - http://www.gpsbabel.org"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xmlns="http://www.topografix.com/GPX/1/0"
+xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
+<time>1970-01-01T00:00:00Z</time>
+<bounds minlat="45.988538473" minlon ="11.609659845" maxlat="46.159847646" maxlon="12.121156748" />
+<wpt lat="46.029489931" lon="11.825879086">
+  <ele>1400.000000</ele>
+  <name>F01140</name>
+  <cmt>DECOLLO MONTE AVENA</cmt>
+  <desc>DECOLLO MONTE AVENA</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="46.008626612" lon="11.860931698">
+  <ele>300.000000</ele>
+  <name>F02030</name>
+  <cmt>AVIOSUPERFICE FELTRE</cmt>
+  <desc>AVIOSUPERFICE FELTRE</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="46.021150004" lon="11.885480080">
+  <ele>230.000000</ele>
+  <name>F03023</name>
+  <cmt>ATTERRAGGIO VALENTINE</cmt>
+  <desc>ATTERRAGGIO VALENTINE</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="46.033586576" lon="11.882367229">
+  <ele>320.000000</ele>
+  <name>F04032</name>
+  <cmt>ATTERRAG. BIRRERIA PEDAVENA</cmt>
+  <desc>ATTERRAG. BIRRERIA PEDAVENA</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="46.159847646" lon="12.083258100">
+  <ele>420.000000</ele>
+  <name>F06042</name>
+  <cmt>DIGA DEL MIS</cmt>
+  <desc>DIGA DEL MIS</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="46.144176666" lon="12.075475551">
+  <ele>460.000000</ele>
+  <name>F07046</name>
+  <cmt>SOSPIROLO CHIESA</cmt>
+  <desc>SOSPIROLO CHIESA</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="46.081281529" lon="11.985699010">
+  <ele>450.000000</ele>
+  <name>F08045</name>
+  <cmt>CESIOMAGGIORE FABBRICA</cmt>
+  <desc>CESIOMAGGIORE FABBRICA</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="46.075557491" lon="12.033310749">
+  <ele>290.000000</ele>
+  <name>F09029</name>
+  <cmt>CARTIERA SGIUSTINA</cmt>
+  <desc>CARTIERA SGIUSTINA</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="45.988538473" lon="11.845020688">
+  <ele>380.000000</ele>
+  <name>F10038</name>
+  <cmt>SEREN DEL GRAPPA CHIESA</cmt>
+  <desc>SEREN DEL GRAPPA CHIESA</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="46.010513118" lon="11.830375818">
+  <ele>346.900000</ele>
+  <name>F11031</name>
+  <cmt>ARTEN FELTRE</cmt>
+  <desc>ARTEN FELTRE</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="46.047897102" lon="11.873818128">
+  <ele>450.000000</ele>
+  <name>F12045</name>
+  <cmt>NORCEN CAMPI DA TENNIS</cmt>
+  <desc>NORCEN CAMPI DA TENNIS</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="46.152906683" lon="12.121156748">
+  <ele>380.000000</ele>
+  <name>F13038</name>
+  <cmt>SOSPIROLO CAVA</cmt>
+  <desc>SOSPIROLO CAVA</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="46.042745832" lon="11.852392523">
+  <ele>1010.000000</ele>
+  <name>F14101</name>
+  <cmt>COL MELON RIF BELVEDERE</cmt>
+  <desc>COL MELON RIF BELVEDERE</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="46.010879760" lon="11.813717946">
+  <ele>310.000000</ele>
+  <name>F15031</name>
+  <cmt>FONZASO SPORTFUL</cmt>
+  <desc>FONZASO SPORTFUL</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="46.040623535" lon="11.984049113">
+  <ele>252.300000</ele>
+  <name>F16025</name>
+  <cmt>BUSCHE LATTERIA</cmt>
+  <desc>BUSCHE LATTERIA</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="46.046930843" lon="11.748528051">
+  <ele>605.000000</ele>
+  <name>F17063</name>
+  <cmt>LAMON</cmt>
+  <desc>LAMON</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="45.991673928" lon="11.746357624">
+  <ele>509.400000</ele>
+  <name>F18051</name>
+  <cmt>ARSIE&apos;</cmt>
+  <desc>ARSIE&apos;</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="46.018978905" lon="11.911089765">
+  <ele>271.200000</ele>
+  <name>F19027</name>
+  <cmt>CASTELLO DI FELTRE</cmt>
+  <desc>CASTELLO DI FELTRE</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="46.011490645" lon="11.833422633">
+  <ele>300.000000</ele>
+  <name>F20030</name>
+  <cmt>SANTA LUCIA CHIESETTA</cmt>
+  <desc>SANTA LUCIA CHIESETTA</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="46.039976504" lon="11.825483515">
+  <ele>1430.000000</ele>
+  <name>F21143</name>
+  <cmt>MALGA CAMPON</cmt>
+  <desc>MALGA CAMPON</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="46.050825348" lon="12.061925180">
+  <ele>300.000000</ele>
+  <name>F22030</name>
+  <cmt>ZANUSSI MEL</cmt>
+  <desc>ZANUSSI MEL</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="46.022014968" lon="11.907799546">
+  <ele>270.000000</ele>
+  <name>F23027</name>
+  <cmt>FELTRE OSPEDALE</cmt>
+  <desc>FELTRE OSPEDALE</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="46.063284117" lon="11.609659845">
+  <ele>860.000000</ele>
+  <name>F24086</name>
+  <cmt>BAILO CASTEL TESINO</cmt>
+  <desc>BAILO CASTEL TESINO</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="46.057193356" lon="11.888858143">
+  <ele>450.000000</ele>
+  <name>F25045</name>
+  <cmt>CASA SCEICCO</cmt>
+  <desc>CASA SCEICCO</desc>
+  <sym>Waypoint</sym>
+</wpt>
+</gpx>
diff --git a/gpsbabel/reference/compegps.wpt b/gpsbabel/reference/compegps.wpt
new file mode 100644 (file)
index 0000000..7225475
--- /dev/null
@@ -0,0 +1,52 @@
+G  WGS 84
+U  1
+W  F01140 A 46.0294899313ºN 11.8258790855ºE 27-MAR-62 00:00:00 1400.000000 DECOLLO MONTE AVENA
+w Waypoint,0,0.0,16777215,255,1,7,,10.0
+W  F02030 A 46.0086266116ºN 11.8609316981ºE 27-MAR-62 00:00:00 300.000000 AVIOSUPERFICE FELTRE
+w Waypoint,0,0.0,16777215,255,1,7,,10.0
+W  F03023 A 46.0211500041ºN 11.8854800796ºE 27-MAR-62 00:00:00 230.000000 ATTERRAGGIO VALENTINE
+w Waypoint,0,0.0,16777215,255,1,7,,10.0
+W  F04032 A 46.0335865765ºN 11.8823672293ºE 27-MAR-62 00:00:00 320.000000 ATTERRAG. BIRRERIA PEDAVENA
+w Waypoint,0,0.0,16777215,255,1,7,,10.0
+W  F06042 A 46.1598476455ºN 12.0832581003ºE 27-MAR-62 00:00:00 420.000000 DIGA DEL MIS
+w Waypoint,0,0.0,16777215,255,1,7,,10.0
+W  F07046 A 46.1441766659ºN 12.0754755514ºE 27-MAR-62 00:00:00 460.000000 SOSPIROLO CHIESA
+w Waypoint,0,0.0,16777215,255,1,7,,10.0
+W  F08045 A 46.0812815292ºN 11.9856990105ºE 27-MAR-62 00:00:00 450.000000 CESIOMAGGIORE FABBRICA
+w Waypoint,0,0.0,16777215,255,1,7,,10.0
+W  F09029 A 46.0755574914ºN 12.0333107491ºE 27-MAR-62 00:00:00 290.000000 CARTIERA SGIUSTINA
+w Waypoint,0,0.0,16777215,255,1,7,,10.0
+W  F10038 A 45.9885384730ºN 11.8450206880ºE 27-MAR-62 00:00:00 380.000000 SEREN DEL GRAPPA CHIESA
+w Waypoint,0,0.0,16777215,255,1,7,,10.0
+W  F11031 A 46.0105131183ºN 11.8303758183ºE 27-MAR-62 00:00:00 346.900000 ARTEN FELTRE
+w Waypoint,0,0.0,16777215,255,1,7,,10.0
+W  F12045 A 46.0478971020ºN 11.8738181282ºE 27-MAR-62 00:00:00 450.000000 NORCEN CAMPI DA TENNIS
+w Waypoint,0,0.0,16777215,255,1,7,,10.0
+W  F13038 A 46.1529066825ºN 12.1211567478ºE 27-MAR-62 00:00:00 380.000000 SOSPIROLO CAVA
+w Waypoint,0,0.0,16777215,255,1,7,,0.0
+W  F14101 A 46.0427458323ºN 11.8523925232ºE 27-MAR-62 00:00:00 1010.000000 COL MELON RIF BELVEDERE
+w Waypoint,0,0.0,16777215,255,1,7,,0.0
+W  F15031 A 46.0108797603ºN 11.8137179459ºE 27-MAR-62 00:00:00 310.000000 FONZASO SPORTFUL
+w Waypoint,0,0.0,16777215,255,1,7,,0.0
+W  F16025 A 46.0406235353ºN 11.9840491129ºE 27-MAR-62 00:00:00 252.300000 BUSCHE LATTERIA
+w Waypoint,0,0.0,16777215,255,1,7,,0.0
+W  F17063 A 46.0469308434ºN 11.7485280506ºE 27-MAR-62 00:00:00 605.000000 LAMON
+w Waypoint,0,0.0,16777215,255,1,7,,0.0
+W  F18051 A 45.9916739281ºN 11.7463576240ºE 27-MAR-62 00:00:00 509.400000 ARSIE'
+w Waypoint,0,0.0,16777215,255,1,7,,0.0
+W  F19027 A 46.0189789055ºN 11.9110897654ºE 27-MAR-62 00:00:00 271.200000 CASTELLO DI FELTRE
+w Waypoint,0,0.0,16777215,255,1,7,,0.0
+W  F20030 A 46.0114906453ºN 11.8334226329ºE 27-MAR-62 00:00:00 300.000000 SANTA LUCIA CHIESETTA
+w Waypoint,0,0.0,16777215,255,1,7,,0.0
+W  F21143 A 46.0399765040ºN 11.8254835151ºE 27-MAR-62 00:00:00 1430.000000 MALGA CAMPON
+w Waypoint,0,0.0,16777215,255,1,7,,0.0
+W  F22030 A 46.0508253483ºN 12.0619251800ºE 27-MAR-62 00:00:00 300.000000 ZANUSSI MEL
+w Waypoint,0,0.0,16777215,255,1,7,,0.0
+W  F23027 A 46.0220149684ºN 11.9077995458ºE 27-MAR-62 00:00:00 270.000000 FELTRE OSPEDALE
+w Waypoint,0,0.0,16777215,255,1,7,,0.0
+W  F24086 A 46.0632841167ºN 11.6096598449ºE 27-MAR-62 00:00:00 860.000000 BAILO CASTEL TESINO
+w Waypoint,0,0.0,16777215,255,1,7,,0.0
+W  F25045 A 46.0571933560ºN 11.8888581427ºE 27-MAR-62 00:00:00 450.000000 CASA SCEICCO
+w Waypoint,0,0.0,16777215,255,1,7,,0.0
+
+
diff --git a/gpsbabel/reference/route/compegps-rte.gpx b/gpsbabel/reference/route/compegps-rte.gpx
new file mode 100644 (file)
index 0000000..1ac52bc
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gpx
+ version="1.0"
+creator="GPSBabel - http://www.gpsbabel.org"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xmlns="http://www.topografix.com/GPX/1/0"
+xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
+<time>1970-01-01T00:00:00Z</time>
+<rte>
+  <name>test</name>
+  <rtept lat="45.789383000" lon="11.553583000">
+    <ele>0.000000</ele>
+    <name>V03087</name>
+    <sym>Waypoint</sym>
+  </rtept>
+  <rtept lat="45.775800000" lon="11.449967000">
+    <ele>0.000000</ele>
+    <name>V05027</name>
+    <sym>Waypoint</sym>
+  </rtept>
+  <rtept lat="45.784883000" lon="11.544417000">
+    <ele>0.000000</ele>
+    <name>V06080</name>
+    <sym>Waypoint</sym>
+  </rtept>
+  <rtept lat="45.754467000" lon="11.493950000">
+    <ele>0.000000</ele>
+    <name>V04041</name>
+    <sym>Waypoint</sym>
+  </rtept>
+  <rtept lat="45.783083000" lon="11.459083000">
+    <ele>0.000000</ele>
+    <name>V09058</name>
+    <sym>Waypoint</sym>
+  </rtept>
+  <rtept lat="45.760583000" lon="11.449617000">
+    <ele>0.000000</ele>
+    <name>V10025</name>
+    <sym>Waypoint</sym>
+  </rtept>
+  <rtept lat="45.765950000" lon="11.480617000">
+    <ele>0.000000</ele>
+    <name>V02023</name>
+    <sym>Waypoint</sym>
+  </rtept>
+</rte>
+</gpx>
diff --git a/gpsbabel/reference/route/compegps.rte b/gpsbabel/reference/route/compegps.rte
new file mode 100644 (file)
index 0000000..f07304e
--- /dev/null
@@ -0,0 +1,20 @@
+G  WGS 84
+ U   1 
+ R   16711680 , test , 1 , -1 
+ W  V03087__________ A 45.7893830000ºN 11.5535830000ºE 27-MAR-62 00:00:00 0.000000  
+ w  Waypoint , 0 , -1.0 , 16777215 , 255 , 1 , 7 ,  , 0.0 
+ W  V05027__________ A 45.7758000000ºN 11.4499670000ºE 27-MAR-62 00:00:00 0.000000  
+ w  Waypoint , 0 , -1.0 , 16777215 , 255 , 1 , 7 ,  , 0.0 
+ W  V06080__________ A 45.7848830000ºN 11.5444170000ºE 27-MAR-62 00:00:00 0.000000  
+ w  Waypoint , 0 , -1.0 , 16777215 , 255 , 1 , 7 ,  , 0.0 
+ W  V04041__________ A 45.7544670000ºN 11.4939500000ºE 27-MAR-62 00:00:00 0.000000  
+ w  Waypoint , 0 , -1.0 , 16777215 , 255 , 1 , 7 ,  , 0.0 
+ W  V09058__________ A 45.7830830000ºN 11.4590830000ºE 27-MAR-62 00:00:00 0.000000  
+ w  Waypoint , 0 , -1.0 , 16777215 , 255 , 1 , 7 ,  , 0.0 
+ W  V10025__________ A 45.7605830000ºN 11.4496170000ºE 27-MAR-62 00:00:00 0.000000  
+ w  Waypoint , 0 , -1.0 , 16777215 , 255 , 1 , 7 ,  , 0.0 
+ W  V02023__________ A 45.7659500000ºN 11.4806170000ºE 27-MAR-62 00:00:00 0.000000  
+ w  Waypoint , 0 , -1.0 , 16777215 , 255 , 1 , 7 ,  , 0.0 
+
\ No newline at end of file
diff --git a/gpsbabel/reference/track/compegps-trk.gpx b/gpsbabel/reference/track/compegps-trk.gpx
new file mode 100644 (file)
index 0000000..a291dee
--- /dev/null
@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gpx
+ version="1.0"
+creator="GPSBabel - http://www.gpsbabel.org"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xmlns="http://www.topografix.com/GPX/1/0"
+xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
+<time>1970-01-01T00:00:00Z</time>
+<trk>
+  <name>ACTIVE LOG 006</name>
+<trkseg>
+<trkpt lat="51.312950000" lon="12.413166667">
+  <ele>161.000000</ele>
+<time>2005-05-01T13:02:47Z</time>
+</trkpt>
+<trkpt lat="51.312883333" lon="12.413233333">
+  <ele>154.000000</ele>
+<time>2005-05-01T13:03:25Z</time>
+</trkpt>
+<trkpt lat="51.312866667" lon="12.413233333">
+  <ele>148.000000</ele>
+<time>2005-05-01T13:03:39Z</time>
+</trkpt>
+<trkpt lat="51.312816667" lon="12.413300000">
+  <ele>139.000000</ele>
+<time>2005-05-01T13:04:16Z</time>
+</trkpt>
+<trkpt lat="51.312833333" lon="12.413266667">
+  <ele>145.000000</ele>
+<time>2005-05-01T13:05:02Z</time>
+</trkpt>
+<trkpt lat="51.312833333" lon="12.413316667">
+  <ele>134.000000</ele>
+<time>2005-05-01T13:05:45Z</time>
+</trkpt>
+<trkpt lat="51.312783333" lon="12.413350000">
+  <ele>131.000000</ele>
+<time>2005-05-01T13:06:44Z</time>
+</trkpt>
+<trkpt lat="51.312783333" lon="12.413333333">
+  <ele>130.000000</ele>
+<time>2005-05-01T13:07:50Z</time>
+</trkpt>
+<trkpt lat="51.312750000" lon="12.413333333">
+  <ele>132.000000</ele>
+<time>2005-05-01T13:08:19Z</time>
+</trkpt>
+<trkpt lat="51.312816667" lon="12.413316667">
+  <ele>144.000000</ele>
+<time>2005-05-01T13:11:16Z</time>
+</trkpt>
+<trkpt lat="51.312933333" lon="12.413450000">
+  <ele>147.000000</ele>
+<time>2005-05-01T13:12:34Z</time>
+</trkpt>
+<trkpt lat="51.313000000" lon="12.413800000">
+  <ele>145.000000</ele>
+<time>2005-05-01T13:13:18Z</time>
+</trkpt>
+<trkpt lat="51.313050000" lon="12.413816667">
+  <ele>145.000000</ele>
+<time>2005-05-01T13:13:27Z</time>
+</trkpt>
+<trkpt lat="51.313050000" lon="12.413850000">
+  <ele>135.000000</ele>
+<time>2005-05-01T13:13:37Z</time>
+</trkpt>
+<trkpt lat="51.313116667" lon="12.413850000">
+  <ele>135.000000</ele>
+<time>2005-05-01T13:13:46Z</time>
+</trkpt>
+<trkpt lat="51.313216667" lon="12.413883333">
+  <ele>136.000000</ele>
+<time>2005-05-01T13:14:03Z</time>
+</trkpt>
+<trkpt lat="51.313300000" lon="12.413966667">
+  <ele>135.000000</ele>
+<time>2005-05-01T13:14:16Z</time>
+</trkpt>
+<trkpt lat="51.313283333" lon="12.414050000">
+  <ele>139.000000</ele>
+<time>2005-05-01T13:14:26Z</time>
+</trkpt>
+<trkpt lat="51.313266667" lon="12.414100000">
+  <ele>139.000000</ele>
+<time>2005-05-01T13:14:30Z</time>
+</trkpt>
+<trkpt lat="51.313050000" lon="12.414616667">
+  <ele>141.000000</ele>
+<time>2005-05-01T13:15:06Z</time>
+</trkpt>
+<trkpt lat="51.312983333" lon="12.414833333">
+  <ele>140.000000</ele>
+<time>2005-05-01T13:15:27Z</time>
+</trkpt>
+<trkpt lat="51.312933333" lon="12.414933333">
+  <ele>140.000000</ele>
+<time>2005-05-01T13:15:39Z</time>
+</trkpt>
+<trkpt lat="51.312950000" lon="12.414966667">
+  <ele>152.000000</ele>
+<time>2005-05-01T13:25:31Z</time>
+</trkpt>
+<trkpt lat="51.312933333" lon="12.414983333">
+  <ele>152.000000</ele>
+<time>2005-05-01T13:25:40Z</time>
+</trkpt>
+<trkpt lat="51.312966667" lon="12.414950000">
+  <ele>155.000000</ele>
+<time>2005-05-01T13:29:18Z</time>
+</trkpt>
+<trkpt lat="51.313166667" lon="12.414600000">
+  <ele>149.000000</ele>
+<time>2005-05-01T13:30:30Z</time>
+</trkpt>
+<trkpt lat="51.313166667" lon="12.414566667">
+  <ele>150.000000</ele>
+<time>2005-05-01T13:30:37Z</time>
+</trkpt>
+<trkpt lat="51.313166667" lon="12.414433333">
+  <ele>151.000000</ele>
+<time>2005-05-01T13:30:47Z</time>
+</trkpt>
+<trkpt lat="51.313150000" lon="12.414383333">
+  <ele>151.000000</ele>
+<time>2005-05-01T13:30:48Z</time>
+</trkpt>
+<trkpt lat="51.313333333" lon="12.413900000">
+  <ele>150.000000</ele>
+<time>2005-05-01T13:30:52Z</time>
+</trkpt>
+<trkpt lat="51.313700000" lon="12.413316667">
+  <ele>150.000000</ele>
+<time>2005-05-01T13:30:57Z</time>
+</trkpt>
+<trkpt lat="51.313983333" lon="12.412866667">
+  <ele>150.000000</ele>
+<time>2005-05-01T13:31:03Z</time>
+</trkpt>
+<trkpt lat="51.314216667" lon="12.412483333">
+  <ele>150.000000</ele>
+<time>2005-05-01T13:31:10Z</time>
+</trkpt>
+<trkpt lat="51.314650000" lon="12.409566667">
+  <ele>143.000000</ele>
+<time>2005-05-01T13:32:38Z</time>
+</trkpt>
+<trkpt lat="51.314650000" lon="12.409500000">
+  <ele>141.000000</ele>
+<time>2005-05-01T13:32:45Z</time>
+</trkpt>
+<trkpt lat="51.314650000" lon="12.409500000">
+  <ele>143.000000</ele>
+<time>2005-05-01T13:33:17Z</time>
+</trkpt>
+<trkpt lat="51.314650000" lon="12.409450000">
+  <ele>139.000000</ele>
+<time>2005-05-01T13:33:42Z</time>
+</trkpt>
+<trkpt lat="51.314650000" lon="12.409350000">
+  <ele>139.000000</ele>
+<time>2005-05-01T13:33:54Z</time>
+</trkpt>
+<trkpt lat="51.314650000" lon="12.409350000">
+  <ele>138.000000</ele>
+<time>2005-05-01T13:34:04Z</time>
+</trkpt>
+<trkpt lat="51.314650000" lon="12.409350000">
+  <ele>139.000000</ele>
+<time>2005-05-01T13:34:20Z</time>
+</trkpt>
+<trkpt lat="51.314650000" lon="12.409350000">
+  <ele>144.000000</ele>
+<time>2005-05-01T13:35:45Z</time>
+</trkpt>
+<trkpt lat="51.314650000" lon="12.409350000">
+  <ele>145.000000</ele>
+<time>2005-05-01T13:35:56Z</time>
+</trkpt>
+</trkseg>
+</trk>
+</gpx>
diff --git a/gpsbabel/reference/track/compegps.trk b/gpsbabel/reference/track/compegps.trk
new file mode 100644 (file)
index 0000000..dc0c04f
--- /dev/null
@@ -0,0 +1,53 @@
+G  WGS 84\r
+U  1\r
+N  oliskoli\r
+D  Leipzig\r
+C  119 119 0 2 -1.000000\r
+L  02:00:00\r
+V  0.0 0.0 0 0 0 0 0.0\r
+M  No comment\r
+E 0|1|00-NUL-00 00:00:00|00:00:00|0\r
+T  A 51.3129500000ºN 12.4131666667ºE 01-MAY-05 13:02:47 N 161.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+t 4294967295|ACTIVE LOG 006|-1|-1\r
+T  A 51.3128833333ºN 12.4132333333ºE 01-MAY-05 13:03:25 s 154.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3128666667ºN 12.4132333333ºE 01-MAY-05 13:03:39 s 148.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3128166667ºN 12.4133000000ºE 01-MAY-05 13:04:16 s 139.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3128333333ºN 12.4132666667ºE 01-MAY-05 13:05:02 s 145.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3128333333ºN 12.4133166667ºE 01-MAY-05 13:05:45 s 134.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3127833333ºN 12.4133500000ºE 01-MAY-05 13:06:44 s 131.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3127833333ºN 12.4133333333ºE 01-MAY-05 13:07:50 s 130.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3127500000ºN 12.4133333333ºE 01-MAY-05 13:08:19 s 132.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3128166667ºN 12.4133166667ºE 01-MAY-05 13:11:16 s 144.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3129333333ºN 12.4134500000ºE 01-MAY-05 13:12:34 s 147.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3130000000ºN 12.4138000000ºE 01-MAY-05 13:13:18 s 145.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3130500000ºN 12.4138166667ºE 01-MAY-05 13:13:27 s 145.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3130500000ºN 12.4138500000ºE 01-MAY-05 13:13:37 s 135.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3131166667ºN 12.4138500000ºE 01-MAY-05 13:13:46 s 135.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3132166667ºN 12.4138833333ºE 01-MAY-05 13:14:03 s 136.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3133000000ºN 12.4139666667ºE 01-MAY-05 13:14:16 s 135.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3132833333ºN 12.4140500000ºE 01-MAY-05 13:14:26 s 139.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3132666667ºN 12.4141000000ºE 01-MAY-05 13:14:30 s 139.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3130500000ºN 12.4146166667ºE 01-MAY-05 13:15:06 s 141.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3129833333ºN 12.4148333333ºE 01-MAY-05 13:15:27 s 140.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3129333333ºN 12.4149333333ºE 01-MAY-05 13:15:39 s 140.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3129500000ºN 12.4149666667ºE 01-MAY-05 13:25:31 s 152.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3129333333ºN 12.4149833333ºE 01-MAY-05 13:25:40 s 152.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3129666667ºN 12.4149500000ºE 01-MAY-05 13:29:18 s 155.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3131666667ºN 12.4146000000ºE 01-MAY-05 13:30:30 s 149.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3131666667ºN 12.4145666667ºE 01-MAY-05 13:30:37 s 150.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3131666667ºN 12.4144333333ºE 01-MAY-05 13:30:47 s 151.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3131500000ºN 12.4143833333ºE 01-MAY-05 13:30:48 s 151.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3133333333ºN 12.4139000000ºE 01-MAY-05 13:30:52 s 150.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3137000000ºN 12.4133166667ºE 01-MAY-05 13:30:57 s 150.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3139833333ºN 12.4128666667ºE 01-MAY-05 13:31:03 s 150.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3142166667ºN 12.4124833333ºE 01-MAY-05 13:31:10 s 150.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3146500000ºN 12.4095666667ºE 01-MAY-05 13:32:38 s 143.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3146500000ºN 12.4095000000ºE 01-MAY-05 13:32:45 s 141.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3146500000ºN 12.4095000000ºE 01-MAY-05 13:33:17 s 143.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3146500000ºN 12.4094500000ºE 01-MAY-05 13:33:42 s 139.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3146500000ºN 12.4093500000ºE 01-MAY-05 13:33:54 s 139.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3146500000ºN 12.4093500000ºE 01-MAY-05 13:34:04 s 138.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3146500000ºN 12.4093500000ºE 01-MAY-05 13:34:20 s 139.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3146500000ºN 12.4093500000ºE 01-MAY-05 13:35:45 s 144.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+T  A 51.3146500000ºN 12.4093500000ºE 01-MAY-05 13:35:56 s 145.0 0.0 0.0 0.0 0 -1000.0 -1.0  -1.0 -1.0\r
+F 1234 \r
index dd3100b7c835f27705e2f69bbb1a11d11f0b0bd1..4998784ee47a2e677d30b5cc99813d3e5b066936 100755 (executable)
@@ -884,4 +884,26 @@ rm -f ${TMPDIR}/mag_pdb-*
 ${PNAME} -i mag_pdb -f reference/route/mag_pdb-sample.pdb -o gpx -F ${TMPDIR}/mag_pdb-sample.gpx
 compare ${TMPDIR}/mag_pdb-sample.gpx reference/route/mag_pdb-sample.gpx
 
+#
+# CompeGPS I/O tests
+#
+rm -f ${TMPDIR}/compegps*
+# read (CompeGPS)
+${PNAME} -i compegps -f reference/compegps.wpt -o gpx -F ${TMPDIR}/compegps-wpt.gpx
+compare reference/compegps-wpt.gpx ${TMPDIR}/compegps-wpt.gpx
+${PNAME} -i compegps -f reference/route/compegps.rte -o gpx -F ${TMPDIR}/compegps-rte.gpx
+compare reference/route/compegps-rte.gpx ${TMPDIR}/compegps-rte.gpx
+${PNAME} -i compegps -f reference/track/compegps.trk -o gpx -F ${TMPDIR}/compegps-trk.gpx
+compare reference/track/compegps-trk.gpx ${TMPDIR}/compegps-trk.gpx
+# write (CompeGPS)
+${PNAME} -i compegps -f reference/compegps.wpt -o compegps -F ${TMPDIR}/compegps.wpt
+${PNAME} -i compegps -f ${TMPDIR}/compegps.wpt -o gpx -F ${TMPDIR}/compegps-wpt2.gpx
+compare reference/compegps-wpt.gpx ${TMPDIR}/compegps-wpt2.gpx
+${PNAME} -t -i compegps -f reference/track/compegps.trk -o compegps -F ${TMPDIR}/compegps.trk
+${PNAME} -i compegps -f ${TMPDIR}/compegps.trk -o gpx -F ${TMPDIR}/compegps-trk2.gpx
+compare reference/track/compegps-trk.gpx ${TMPDIR}/compegps-trk2.gpx
+${PNAME} -r -i compegps -f reference/route/compegps.rte -o compegps -F ${TMPDIR}/compegps.rte
+${PNAME} -i compegps -f ${TMPDIR}/compegps.rte -o gpx -F ${TMPDIR}/compegps-rte2.gpx
+compare reference/route/compegps-rte.gpx ${TMPDIR}/compegps-rte2.gpx
+
 exit 0
index df3317261bd354b263eba1ea4d1443db8af8c84f..e49863554a82fe91ff22d413b15d7411d867d7e4 100644 (file)
@@ -93,6 +93,7 @@ extern ff_vecs_t msroute_vecs;
 extern ff_vecs_t cst_vecs;
 extern ff_vecs_t nmn4_vecs;
 extern ff_vecs_t magpdb_vecs;
+extern ff_vecs_t compegps_vecs;
 
 static
 vecs_t vec_list[] = {
@@ -475,6 +476,12 @@ vecs_t vec_list[] = {
                "Map&Guide to Palm/OS exported files (.pdb)",
                "pdb"
        },
+       {
+               &compegps_vecs,
+               "compegps",
+               "CompeGPS data files (.wpt/.trk/.rte)",
+               NULL
+       },
        {
                NULL,
                NULL,